import { userItem } from '@/types/user'
// 持久化储存
const STORAGE_KEY = 'HM-RABBIT-92'
// 设置数据
export function setUserList(userList: userItem): void {
  localStorage.setItem(STORAGE_KEY, JSON.stringify(userList))
}
// 获取数据
export function getUserList(): userItem {
  return JSON.parse(localStorage.getItem(STORAGE_KEY) || '{}')
}
// 移除数据
export function removeUserList(): void {
  localStorage.removeItem(STORAGE_KEY)
}
